package rms.mall.server.application.service;

import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import rms.mall.server.api.module.system.AcctInfoTO;
import rms.mall.server.domain.entity.system.AcctInfo;
import rms.mall.server.domain.repository.system.AcctInfoRepository;
import rms.mall.server.domain.utils.BaseConvert;

import javax.annotation.Resource;

@Component
public class AcctInfoService {

    @Resource
    private AcctInfoRepository acctInfoRepository;

    public AcctInfoTO getAcctInfoById(Long id) {
        AcctInfo acctInfo = acctInfoRepository.getById(id);
        return BaseConvert.convert(acctInfo, AcctInfoTO.class);
    }

}
